//
//  ModelTableViewCell.m
//  豆瓣YHY
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ModelTableViewCell.h"
#import "UIImageView+WebCache.h"
@implementation ModelTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self zz];
        
    }
    return self;
}
- (void)zz{
    self.imageview = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 360, 140)];
  //  NSLog(@"z");
    //self.imageview.backgroundColor = [UIColor yellowColor];
    self.imageview.image = [UIImage imageNamed:@"bg_eventlistcell.png"];
    [self.contentView addSubview:self.imageview];
    
    self.LabelField = [[UILabel alloc]initWithFrame:CGRectMake(140, 50, 200, 40)];
  //  self.textField.text =@"";
   // self.LabelField.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.LabelField];
    
    self.imageviewpicture = [[UIImageView alloc]initWithFrame:CGRectMake(20, 20, 100, 120)];
    self.imageviewpicture.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.imageviewpicture];
}


- (void)setMovieA:(Movie *)movieA{
    if (_movieA != movieA) {
        [_movieA release];
        _movieA = [movieA retain];
    }
  //  NSLog(@"++++++%@",movieA.movieNamep);
    self.LabelField.text = movieA.movieNamep;
//    NSLog(@"%@",self.LabelField.text);


    NSURL *url = [NSURL URLWithString:self.movieA.pic_url];
    [self.imageviewpicture sd_setImageWithURL:url];

}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
